package cola0502.project.hellospringbootcola0502.controller;

import cola0502.project.hellospringbootcola0502.event.ColaEvent;
import cola0502.project.hellospringbootcola0502.service.RedisService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
@RequestMapping("/v1/api/redis")
public class RedisController {

    @Resource
    RedisService redisService;

    @GetMapping("testRedisAdd")
    public String testRedisAdd(String key, String value) {
        redisService.testRedisAdd(key,value);
        return "testRedisAdd";
    }

    @GetMapping("testRemove")
    public String testRemove(String key) {
        redisService.testRemove(key);
        return "testRemove";
    }


}
